<template>
	<div>
		<top-nav bgColor="white" title="选择账户"  btnName="btn"  :rightShow="false" returnPath="上一级"></top-nav>
		
		<div style="width: 100%;height: 3rem;"></div>
		<order-card-item v-for="item in list"
			:key = "item.ID"
			:ID="item.ID"
			:BillNo="item.BillNo"
			:CustomName="item.CustomName"
			:Balance="item.Balance"
			:CustomID="item.CustomID"
			:CustomNumber="item.CustomNumber"
			:Time="item.Time"
			@faSendParam="sendParam(item)"
		/>
	</div>
</template>

<script>
	 import TopNav from '@/components/nav/topNav.vue'
	 import OrderCardItem from '@/page/project/hongchang/menuChild/laddingBills/addBills/orderCardItem.vue'
	 export default {
		components: {
		      TopNav,
		      OrderCardItem
		},
		data(){
			return{
				list:["1","2"]
			}
		},
		mounted(){
			console.info(this.list)
			this.getAllOrder()
			
			
		},
		methods:{
//			getAllOrder(){
//				let that=this
//				that.axios.post('/demo/getAllOrder',{
//					'factoryId':this.$parent.factoryId,
//					'uid':localStorage.uid,
//					'currentpage':1
//				}).then(function(response){
//					that.list=response.data.data.list
//					console.info(response.data.data)
//				}).catch(function(error){
//					
//				})
			sendParam(data){
				let that=this
		 		that.$router.push(
			 	{path:'hongchangAddBills',
			 		name:'hongchangAddBills',
					 params: { 
					 			addBills:data
		            		}
				})
			},
			getAllOrder(){
				let that=this
				that.axios.post('/hongchang/getSalesItem',{
					'factoryId':localStorage.factoryId,
					'uid':localStorage.uid,
					'currentpage':1
				}).then(function(response){
					console.info(response.data.data)
					that.list=response.data.data.list
				}).catch(function(error){
					console.info(error)
				})
				}
	 		}
	}
</script>

<style>
</style>